<?php /*
	
*/ ?>
<? 
include("system/config.inc.php");

	if(isset($_REQUEST['Submit']) && ($_REQUEST['Submit'])=="Send Mail")
	{		
		$email = "support@duntuk.com";
		$sub = "Message From Duntuk.com Admin";
		$text = $_REQUEST['custemail'];
		$memail = $_REQUEST['comments'];
	
		mail($text, $sub, $memail, "From: $email \nReply-To: $memail"); 
	}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to Duntuk- admin module</title>
<link href="css/dunt.css" rel="stylesheet" type="text/css" />
</head>

<script language="javascript" src="js/mailorder.js"></script>

<body onload="">
<!--<script language="JavaScript1.2">mmLoadMenus();</script>-->

<form name="sendmail" method="post" action="">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" class="middlebackground">
  <tr>
    <td valign="top" align="center"><? include(INC."top.inc.php");?></td>
  </tr>
  <tr valign="top">
    <td align="center"><table width="55%" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
      <tr>
        <td colspan="3" align="center" class="bg1"><strong>Send Mail...</strong></td>
        </tr>
      <tr>
        <td width="28%">&nbsp;</td>
        <td width="2%" align="right">&nbsp;</td>
        <td width="70%">&nbsp;</td>
      </tr>
      
      <tr>
        <td>&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="center">(* All fields are Required)</td>
      </tr>
      <tr>
        <td align="right" class="sltimg">&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td align="right" class="sltimg">*E-Mail ID </td>
        <td align="center">:</td>
<? 
	$sql="select * from tblcustomers where intcusid=".$_REQUEST['cust'];
	$resman = $obj_db->select($sql);
	if(count($resman)>0)
	{
		for($m=0;$m<count($resman);$m++)
		{
	
		?>
        <td align="left"><input name="custemail" type="text" id="custemail" value="<?=$resman[$m]['varcustemail'];?>" size="26" /></td>
<?
		}
	}
	
?>		
      </tr>
      <tr>
        <td align="right" class="sltimg">&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right" valign="top" class="sltimg">*Message</td>
        <td align="center" valign="top">:</td>
        <td><textarea name="comments" cols="40" rows="10" id="comments"></textarea></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="3" align="center"><input name="Submit" type="submit" class="btn" value="Send Mail" onclick="return check();"/>
          <input name="sendmail" type="hidden" id="sendmail" /></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center"><? include(INC."bottom.php");?></td>
  </tr>
</table>
</form>

</body>
</html>
